﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccountList.aspx.cs" Inherits="SAD_Assignment1.Admin.AccountList" MasterPageFile="~/Shared/Site1.Master" %>

<asp:Content runat="server" ContentPlaceHolderID="head">
    <title>Account List</title>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div class="container-title">Danh sách tài khoản</div>
    <asp:Button CssClass="btn btn-success" runat="server" Text="Tạo tài khoản mới" style="float:right;"
        OnCommand="CreateBtn_Command" ID="CreateBtn"/>
    <asp:GridView runat="server" ID="grid" AutoGenerateColumns="False" CssClass="table table-hover" 
        OnRowUpdating="grid_RowUpdating" OnRowDeleting="grid_RowDeleting" DataKeyNames="ID" OnPageIndexChanging="grid_PageIndexChanging"
        PagerSettings-Mode="NumericFirstLast" AllowPaging="true">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" />
            <asp:BoundField DataField="Email" HeaderText="Email" />
            <asp:BoundField DataField="Name" HeaderText="Name" />
            <asp:BoundField DataField="Roles" HeaderText="Roles" />
            <asp:ButtonField ButtonType="Button" Text="Update" CommandName="Update">
                <ControlStyle CssClass="btn btn-success" Width="100%"></ControlStyle>
            </asp:ButtonField>
            <asp:ButtonField ButtonType="Button" Text="Block" CommandName="Delete">
                <ControlStyle CssClass="btn btn-danger" Width="100%"></ControlStyle>
            </asp:ButtonField>
        </Columns>
    </asp:GridView>
</asp:Content>
